home *** CD-ROM | disk | FTP | other *** search
- : CALCCALL ( calledOpAdr callingOpAdr -- opcode data #bytes , if #bytes<8)
- ( ELSE opcode w@aN-2 .. w@a0 N*2 )
- \
- CloneOverlay @ \ only 'on' if CloneOverlay set
- IF
- ( -- calledOpAdr callingOpAdr )
- \ Can't save ABS hunk tables in overlays, need
- \ new 'call' mechanism...
- \
- \ move.l #CalledAdr,a0
- \ jsr 0(a5,a0.l) a5 set by CallOverlay (in startjforth.asm)
- \
- $ 8800 $ 4eb5
- 3 pick 4 pick 16 -shift
- $ 207c
- 10
- ELSE
- \ is it within relative-distance range?
- \
- 2dup 2+ - [ decimal ] dup -32769 > over 32768 < and
- ( -- cldop clngop rel-displacement flag )
- IF
- -rot 2drop $ 6100 swap 4
- ELSE
- drop
- over [ 32 k ] literal <
- IF
- \
- \ Origin relative...
- \
- drop $ 4eac swap 4
- ELSE
- \
- \ if 32k - 96k, use +64k relative...
- \
- over [ 96 k ] literal <
- IF
- drop [ 64 k ] literal - $ 4eab swap 4
- ELSE
- \
- \ Push CallingOpAdr+2 on TargetABS stack for relocation.
- 2+ TargetABS +stack $ 4eb9 swap 6
- THEN
- THEN
- THEN
- THEN
- ;
-
-
-